package com.example.day4_fragment;


import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;

import static com.example.day4_fragment.BlankFragment2.*;


/**
 * A simple {@link Fragment} subclass.
 */
public class BlankFragment2 extends Fragment implements YaoListener {


    public BlankFragment2() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_blank_fragment2, container, false);
    }

    @Override
    public void onClick() {
        Toast.makeText(getContext(), "1111", Toast.LENGTH_SHORT).show();

    }




}
//接口回调
interface YaoListener{
    void onClick();
}

